package com.neusoft.demo12;

public class Test {
    public static void main(String[] args) {
        int a = 1;
        int b = 2;
        System.out.println(a == b);

        String s1 = new String("abc");
        String s2 = new String("abc");
        String s3 = "abc";
        System.out.println(s1 == s2); //内存地址不同 false
        System.out.println(s1.equals(s2)); //比较内容
        System.out.println(s1.equals(s3)); //true
        System.out.println(s1 == s3);

    }
}
